FROM centos:7.4.1708
COPY CentOS-Base.repo /etc/yum.repos.d/
COPY yum.conf /etc/
ENV LANG=zh_CN.UTF-8 \
    LANGUAGE=zh_CN:zh \
    LC_ALL=zh_CN.UTF-8
RUN yum makecache && \
    yes|cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo 'Asia/Shanghai' > /etc/timezone && \
    yum install -y less net-tools glibc-common && \
    localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8
RUN yum install -y make gcc python3-devel libffi-devel openssl-devel wget zlib-devel bzip2-devel xz-devel && \
    wget https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz && \
    tar xvf Python-3.8.10.tgz && \
    rm -rf Python-3.8.10.tgz && \
    cd Python-3.8.10 && \
    ./configure && \
    make && \
    make install && \
    cd .. && \
    rm -rf Python-3.8.10 && \
    pip3 install poetry && \
    yum history -y undo 3 && \
    yum install -y gcc-c++ && \
    yum install -y mysql-devel && \
    ln -s /usr/local/bin/pip3 /usr/local/bin/pip